package ooday01;

/**
 * 汽车类
 */
public class Car {
    //成员变量---描述变量的属性
    String brand;
    String color;
    double price;
    int capacity;
    //构造方法
    Car(){
    }
    Car(String brand, String color, double price, int capacity) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.capacity = capacity;
    }

    //方法---描述对象的行为
    void start(){
        //                         bm.price       bm.color    bm.brand   bm.capacity
        System.out.println("一辆价格为"+price+"元的"+color+"色的"+brand+"牌"+capacity+"座汽车启动了...");
    }

    void run(){
        //                         bm.price       bm.color    bm.brand   bm.capacity
        System.out.println("一辆价格为"+price+"元的"+color+"色的"+brand+"牌"+capacity+"座汽车开始飙车了...");
    }

    void stop(){
        //                         bm.price       bm.color    bm.brand   bm.capacity
        System.out.println("一辆价格为"+price+"元的"+color+"色的"+brand+"牌"+capacity+"座汽车停下来了...");
    }

}
